package com.first.util;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class Tree {

    // 对应mid
    private Integer id;

    // 对应的权限名称
    private String title;

    // 默认展开
    private boolean spread =true;

    // 套娃
    private List<Tree> children;

    public Tree(Integer id, String title, List<Tree> children) {
        this.id = id;
        this.title = title;
        this.children = children;
    }
}
